package stu.aistar.day03;

/**
 * 笔试题 - 参数
 */
public class ParamTransferDemo {
    public static void main(String[] args) {
        int[] arr1 = {10};
        int[] arr2 = {20};

        change(arr1,arr2);
        System.out.println("main-arr1[0]:"+arr1[0]);//10
        System.out.println("main-arr2[0]:"+arr2[0]);//100
    }

    private static void change(int[] arr1, int[] arr2) {
        arr2[0] = 100;
        arr1 = arr2;
        System.out.println("change-arr1[0]:"+arr1[0]);//100
        System.out.println("change-arr2[0]:"+arr2[0]);//100
    }
}
